Integrating with n8n

Help Center

n8n homepage

n8n lets you integrate with DocuGenerate and connect to hundreds of other services to create automated workflows between different applications and services. Each workflow consists of nodes that represent different services or actions. You can set up triggers to start workflows automatically and define actions to be executed when those triggers occur.

Summary

1. Install the DocuGenerate Node
2. Generate Document (Action)
3. List Documents (Action)
4. Get Document (Action)
5. Update Document (Action)
6. Delete Document (Action)
7. List Templates (Action)
8. Get Template (Action)
9. Delete Template (Action)

1. Install the DocuGenerate Node

The DocuGenerate integration is available as an unverified community node that needs to be installed on self-hosted n8n instances and is not yet available on n8n Cloud. The verification process with n8n is ongoing, and the official app will soon be available directly on n8n Cloud as well, making it easier to use without requiring a self-hosted instance.

To install and configure the DocuGenerate npm package, follow the instructions below:

  • Navigate to Settings > Community nodes from the main menu and click on the Install a community node button.

    Install community node

  • In the npm Package Name field enter n8n-nodes-docugenerate and click Install.

    Install DocuGenerate node

  • When using a DocuGenerate action for the first time, you’ll be prompted to create a credential. Copy your API Key and paste it in the corresponding field on the authentication dialog, then click on Save.

    DocuGenerate credential setup

2. Generate Document (Action)

This action creates a document from a specified template and dataset. Define the document’s name, filename, and format, and provide the data to populate fields in the template. The following parameters are customizable:

  • Template Name or ID: Specifies the template to use.
  • Name: Name of the generated document.
  • Format: Output format (e.g., .pdf, .docx, .doc, .odt, .txt, .html, .png).
  • Data: JSON data to populate fields in the template.

By default, the Data parameter is set to {{ $json }}, which automatically uses the output from the previous node in your workflow. This allows you to dynamically populate your documents with data from other services or nodes in your n8n workflow.

Generate document action default data

You can also edit the Data value manually to create custom JSON objects that match the merge tags defined in your template and map values from previous nodes.

Generate document action with custom JSON

3. List Documents (Action)

Fetches a list of documents generated from a specific template, allowing you to track or display previously generated documents related to a template. It requires the following parameter:

  • Template Name or ID: Specifies the template for which to list documents.

List documents action

4. Get Document (Action)

This action retrieves metadata for a specific document, such as its filename, format, and document URI. The following parameter is required:

  • Document ID: Specifies the ID of the document to retrieve.

Get document action

5. Update Document (Action)

Use this action to modify details of an existing document, such as updating the document’s name. The following parameters are expected:

  • Document ID: Specifies the ID of the document to update.
  • Name: Document’s updated name.

Update document action

6. Delete Document (Action)

This action deletes a document from your DocuGenerate account. It requires the following parameter:

  • Document ID: Specifies the ID of the document to delete.

Delete document action

7. List Templates (Action)

Retrieves a list of all templates stored in your DocuGenerate account, including basic details such as template names and IDs. This action does not require any parameters.

List templates action

8. Get Template (Action)

This action retrieves detailed information for a specific template, using the template’s name or ID. You can access attributes like the template’s name, tags, and format. It requires the following parameter:

  • Template Name or ID: Specifies the template to retrieve.

Get template action

9. Delete Template (Action)

Remove a template from your DocuGenerate account. It requires the following parameter:

  • Template Name or ID: Specifies the template to delete.

Delete template action